// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   CommonUtil.java

package com.vandagroup.common.resources;

import java.util.ResourceBundle;

public class CommonUtil
{

    private static String drivers = null;

    public CommonUtil()
    {
    }

    public static String getDBType()
    {
        if(drivers == null)
            return "";
        if(drivers.toUpperCase().indexOf("IBM") >= 0)
            return "db2";
        if(drivers.toUpperCase().indexOf("ORACLE") >= 0)
            return "oracle";
        if(drivers.toUpperCase().indexOf("INFORMIX") >= 0)
            return "informix";
        else
            return "";
    }

    public static String getUploadFilePath()
    {
        ResourceBundle bundle = ResourceBundle.getBundle("com.vandagroup.common.resources.file");
        String path = bundle.getString("uploadfile.path");
        if(!path.endsWith("/") && !path.endsWith("\\"))
            return path + "/";
        else
            return path;
    }

    static 
    {
        ResourceBundle bundle = ResourceBundle.getBundle("com.vandagroup.common.resources.db");
        drivers = bundle.getString("drivers");
    }
}
